import 'package:flutter_test/flutter_test.dart';
import 'package:native_exif/native_exif.dart';
import 'package:native_exif/native_exif_platform_interface.dart';
import 'package:native_exif/native_exif_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockNativeExifPlatform
    with MockPlatformInterfaceMixin
    implements NativeExifPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final NativeExifPlatform initialPlatform = NativeExifPlatform.instance;

  test('$MethodChannelNativeExif is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelNativeExif>());
  });

  test('getPlatformVersion', () async {
    NativeExif nativeExifPlugin = NativeExif();
    MockNativeExifPlatform fakePlatform = MockNativeExifPlatform();
    NativeExifPlatform.instance = fakePlatform;

    expect(await nativeExifPlugin.getPlatformVersion(), '42');
  });
}
